/**
 * Copyright (c) 2006-2007 Jinyi.lu
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of GNU LGPL license by gun.org
 * which accompanies this distribution, and is available at
 * http://gnu.feld-it.at/copyleft/lesser.html
 * 
 * Project Homepage : http://code.google.com/p/demou
 * Source Code: svn checkout http://demou.googlecode.com/svn/trunk/ demou
 * Mailing list : jinyi.lu@gmail.com
 *                stonelu@126.com
 *
 *  
 * Contributors:
 *     JinYi.Lu - initial API and implementation
 */
package cn.tworen.demou.cmd;

import java.util.ArrayList;
import java.util.List;

/**
 * Created on  2007-1-14
 *
 * Title       : InvokeCmd.java
 * Description : 
 * 
 * @author     : LuJinYi
 * @version    : 1.0
 * @Date       : 2007-1-14
 * History     : 
 * 
 */
public class InvokeCmd<T> extends AbsCmd implements IInvokeCmd<T> {
	private double trxId = 1;
//	private Message message = new Message();
	protected CmdName cmdName = null;
	private List<T> params = new ArrayList<T>();
	private String functionCall = null;

	public InvokeCmd(DataType dataType) {
		this.getHeader().dataType = dataType;
	}
	public CmdName getCmdName() {
		return this.cmdName;
	}

	public void setCmdName(CmdName cmdName) {
		this.cmdName = cmdName;
	}
	public double getTrxId() {
		return trxId;
	}
	
	public void setTrxId(double trxId) {
		this.trxId = trxId;
	}
	/**
	 * @return Returns the params.
	 */
	public List<T> getParams() {
		return params;
	}
	/**
	 * @param params the params to set
	 */
	public void addParam(T param) {
		this.params.add(param);
	}
	public String getFunctionCall() {
		return this.functionCall;
	}
	public void setFunctionCall(String name) {
		this.functionCall = name;
	}
}
